<?php

namespace App\Http\Controllers\Auth;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Model\About;

class AboutController extends Controller
{
    //
    public function getInfo(Request $request){
        return response(
            [
                'data' => About::all(),
                'code' => 200
            ]
        );
    }
    public function updateInfo(Request $request){
        $about = About::find(1);
//        dd($request->get('form'));
        $about->update($request->get('form'));
//        $about->update([
//            'company' => $request->get('company'),
//            'logo' => $request->get('logo'),
//            'thumbnail' => $request->get('thumbnail'),
//            'images' => $request->get('images'),
//            'address' => $request->get('address'),
//            'introduce' => $request->get('introduce'),
//            'telephone' => $request->get('telephone'),
//            'mobilephone' => $request->get('mobilephone'),
//            'email' => $request->get('email'),
//            'en_name' => $request->get('en_name'),
//            'manage' => $request->get('manage'),
//        ]);
        return response(
            [
                'msg' => '提交成功',
                'code' => 200
            ]
        );
    }

}
